A storage device generally has a storage medium and a medium controller that is configured to control an I/O (Input/Output) of data to the storage medium. As an apparatus that includes the storage device, for example, there is a storage apparatus or a host apparatus that is configured to carry out an I/O of data to the storage apparatus.
As a storage medium, for example, a non-volatile semiconductor memory that is erasable in a lump has been developed. As such a non-volatile semiconductor memory, for example, there is a flash memory. The flash memory (typically a NAND-type flash memory) includes a plurality of blocks, and each block includes a plurality of pages. I/O of data is carried out on a page basis, and data is erased on a block basis. An erasure time is shorter than a write time. An update of recorded data (data that has been written) of the flash memory is generally carried out as follow. That is, the medium controller reads the recorded data (pre-update data) from a page, creates update data by reflecting the write target data to at least a part of the recorded data, writes the updated data to an empty page, and invalidates a page storing the recorded data (a processing for disabling a reference from an higher-level apparatus of the storage device). In the case where an empty page is depleted, the medium controller erases data from a block in which all pages are invalid pages (invalidated pages), thereby making an invalid pages to be empty pages.
Each page includes a plurality of (for example, 16) sectors. Since the writing processing is carried out in a page unit, even if only one sector is rewritten, it is necessary to rewrite one page that includes the sector.
For the flash memory, an erasure count of data is generally limited. For a block in which rewriting of data is concentrated and an erasure count is increased, an erasure of data cannot be carried out, whereby the block cannot be used. Consequently, it is necessary to prevent the data erasure processing from being concentrated to a specific block. Moreover, for the flash memory, errors of data in a page are increased with time. Consequently, the medium controller carries out an operation called refresh for migrating data after the elapse of a certain period of time after being rewritten to another page.
For the flash memory that has the above characteristics, it is thought that a deduplication technique such as Patent Literature 1 is used in order to shorten an erasure time of data and to reduce an erasure count of data. The deduplication technique is a technique for corresponding a plurality of logical address spaces (for example, logical pages) storing duplicated data to one physical address space (for example, a physical page) storing the data in the case where logical addresses that are provided to an higher-level apparatus and physical addresses of an actual storage area are corresponded to each other to be managed. By using the deduplication technique, an amount of data that is written to a storage medium can be reduced and an operating life of the flash memory can be tried to be lengthened for the storage device in which the flash memory is operated as a storage medium.